package com.study.netty.file.protocal;

import lombok.Data;

@Data
public class DeviceProtocol {

	/**
	 * 消息类型
	 */
	private int cmd;

	/**
	 * 消息长度
	 */
	private int contentLength;

	/**
	 * 消息内容
	 */
	private byte[] content;

	public DeviceProtocol(int cmd, byte[] content) {
		this.cmd = cmd;
		this.contentLength = content.length;
		this.content = content;
	}

	public DeviceProtocol() {
		this.cmd = cmd;
		this.contentLength = content.length;
		this.content = content;
	}

}
